<link href="<?php echo $img_url; ?>style/css/fotorama.css" rel="stylesheet" type="text/css"> 
<script src="<?php echo $img_url; ?>style/js/FE/fotorama.js" type="text/javascript" charset="utf-8"></script>
<script language="javascript" src="<?php echo $img_url; ?>style/js/FE/fe_adv.js"></script>
<div id="detail-title">
    <span class="title">Rao vặt</span>
    <img src="<?php echo $img_url; ?>style/images/img28.gif">
    <div class="ico-social">
        <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $current_url; ?>&display=popup&ref=plugin" target="_blank"><img src="<?php echo $img_url; ?>style/images/imgfb.gif" width="16" height="16" border="0"></a>
        <a href="https://twitter.com/share" target="_blank"><img src="<?php echo $img_url; ?>style/images/imgtw.gif" width="16" height="16" border="0"></a>
        <a href="https://plus.google.com/share?url=<?php echo $current_url; ?>" target="_blank"><img src="<?php echo $img_url; ?>style/images/imggp.gif" width="16" height="16" border="0"></a>
        <a href="javascript:void(0);" onclick="return openPopup('contactForm')"><img src="<?php echo $img_url; ?>style/images/imgma.gif" width="16" height="16" border="0"></a>
        <a href="javascript:void(0);" onclick="javascript:window.print();"><img src="<?php echo $img_url; ?>style/images/imgpr.gif" width="16" height="16" border="0"></a>

        <span class="time">
            <?php
            //show date time Tieng Viet
            $str_search = array(
                "Mon",
                "Tue",
                "Wed",
                "Thu",
                "Fri",
                "Sat",
                "Sun"
            );
            $str_replace = array(
                "Th&#7913; hai",
                "Th&#7913; ba",
                "Th&#7913; t&#432;",
                "Th&#7913; n&#259;m",
                "Th&#7913; s&#225;u",
                "Th&#7913; b&#7843;y",
                "Ch&#7911; nh&#7853;t"
            );
            $timenow = gmdate("D, d/m/Y | H:i", time() + 7 * 3600);
            $timenow = str_replace($str_search, $str_replace, $timenow);
            echo $timenow;
            ?>      
        </span>
    </div>  
    <div id="seperator"></div>
    <!-- details: column -->
    <div id="detail-body">
        <div id="detail-bleft">
            <div id="adv-search">
                <form name="trueform2" id="trueform2" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" onSubmit="return submitSearchAdv('<?php echo $base_url; ?>rao-vat/tim-kiem', 1);">
                    <input type="text" value="Nội dung tìm" id="txt_Adv_Keyword" name="txt_Adv_Keyword" class="Adv_Keyword" onfocus="this.value = '';" onblur="if (this.value == '') {
                        this.value = 'Nội dung tìm';
                    }">
                    <select name="cbo_ADV_Cate" id="cbo_ADV_Cate" class="ADV_Cate">
                        <option class="combo_item" value="">-- Chọn chuyên mục --</option>
                        <?php foreach ($aAdvCate as $key => $item): ?>
                            <option class="combo_item" value="<?php echo $item->cate_id; ?>" <?php if (isset($adv_cate_id) && ($adv_cate_id == $item->cate_id)) echo "selected='selected'" ?>><?php echo $item->cate_name; ?></option>
                            <?php
                            //$i++;
                        endforeach;
                        ?>          
                    </select> 
                    <select name="cbo_ADV_City" id="cbo_ADV_City" class="ADV_City">
                        <option class="combo_item" value="">-- Chọn Tỉnh/TP --</option>
                        <?php foreach ($aCity as $key => $item): ?>
                            <option class="combo_item" value="<?php echo $item->city_id; ?>" <?php if (isset($city_id) && ($city_id == $item->city_id)) echo "selected='selected'" ?>><?php echo $item->city_name; ?></option>
                            <?php
                            //$i++;
                        endforeach;
                        ?>
                    </select>         
                    <input type="hidden" name="isPost" value="1">
                    <input type="submit" name="btn_Search" id="btn_Search" value="Tìm kiếm" class="ADV_Post" class="button2" />          
                    <input type="button" value="Đăng tin" id="txt_ADV_Post" name="txt_ADV_Post" class="ADV_Post" onClick="window.location = '<?php echo $base_url . "rao-vat/dang-tin"; ?>'">
                </form>
            </div>    
            <div class="clearfix"></div>  
            <br>
            <div id="detail-adv">
                <span class="title"><?php echo $aAdvDetails[0]->title; ?></span>
                <br><br>
                <span class="contact-name"><b>Tên liên hệ</b>: <?php echo $aAdvDetails[0]->user_full_name; ?></span>
                <br>
                <span class="contact-name"><b>Điện thoại</b>: <?php echo $aAdvDetails[0]->user_tel; ?></span>
                <div id="seperator"></div>          
                <span class="adv-content">
                    <?php echo $aAdvDetails[0]->desc; ?>
                </span>
                <?php if ($aAdvDetails[0]->img != null && $aAdvDetails[0]->img != '') { ?>
                    <div class="fotorama"
                         data-width="700"
                         data-ratio="3/2"
                         data-nav="thumbs"
                         data-thumbheight="48">
                             <?php
                             $arr_img = explode(';', $aAdvDetails[0]->img);
                             foreach ($arr_img as $img) {
                                 ?>
                            <a href="<?php echo $img_url; ?>style/upimg_man/image/uploads/<?php echo $img; ?>"><img src="<?php echo $img_url; ?>style/upimg_man/image/uploads/<?php echo $img; ?>" width="144" height="96"></a>
                        <?php } ?>
                    </div>
                <?php } ?>
                <br/>
                <div id="seperator"></div> 
                <br/>
                <span class="contact-name"><b>Tên liên hệ</b>: <?php echo $aAdvDetails[0]->user_full_name; ?></span>
                <br>
                <span class="contact-name"><b>Điện thoại</b>: <?php echo $aAdvDetails[0]->user_tel; ?></span>
            </div>
            <div id="others">
                <div class="cate-title">
                    <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                    <span>Tin rao vặt khác</span>
                    <a href="<?php echo $base_url; ?>rao-vat" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
                </div>  
                <ul class="adv-list">
                    <?php
                    foreach ($aAdv_Others as $key => $item):
                        ?>          
                        <li class="col1"><a href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html"><?php echo $item->title; ?></a></li>
                        <li class="col2"><?php echo date("d/m/Y", strtotime($item->create_date)); ?></li>
                        <li class="col3"><?php
                    foreach ($aCity as $city) {
                        if ($item->city_id == $city->city_id) {
                            echo $city->city_name;
                        }
                    }
                        ?></li>
                        <?php
                    endforeach;
                    ?>
                    <div class="clearfix"></div>   
                    <br>                 
                </ul>                
            </div>        
        </div>
        <div class="clearfix"></div>    
    </div>
</div>